package fr.upstlse.glre.client.vo.user;

import com.extjs.gxt.ui.client.widget.Html;
import com.google.gwt.user.client.rpc.IsSerializable;


public class EntrepriseVOGWT implements IsSerializable
{
    /**
     * The serial version UID of this class. Needed for serialization.
     */
    private static final long serialVersionUID = -1023425936080106920L;
    
    private long id;
    private String nom;
    private String maitredestage;
    private String maitredestageemail;
    private AdresseVOGWT adresse;

    public EntrepriseVOGWT()
    {
        this.id = 0;
        this.nom = null;
        this.maitredestage = null;
        this.maitredestageemail = null;
        this.adresse = null;
    }

    public EntrepriseVOGWT(long id, String nom, String maitredestage, String maitredestageemail, AdresseVOGWT adresse)
    {
        this.id = id;
        this.nom = nom;
        this.maitredestage = maitredestage;
        this.maitredestageemail = maitredestageemail;
        this.adresse = adresse;
    }

	public long getId() {
		return id;
	}

	public void setId(long id) {
		this.id = id;
	}

	public String getNom() {
		return nom;
	}

	public void setNom(String nom) {
		this.nom = nom;
	}

	public String getMaitredestage() {
		return maitredestage;
	}

	public void setMaitredestage(String maitredestage) {
		this.maitredestage = maitredestage;
	}

	public String getMaitredestageemail() {
		return maitredestageemail;
	}

	public void setMaitredestageemail(String maitredestageemail) {
		this.maitredestageemail = maitredestageemail;
	}

	public AdresseVOGWT getAdresse() {
		return adresse;
	}

	public void setAdresse(AdresseVOGWT adresse) {
		this.adresse = adresse;
	}
	
	public Html getHtml() {
		String lNom = "<p>" + getNom() + "</p>";
		String lMaitreDeStage = "<p>" + getMaitredestage() + "</p>";
		String lMaitreDeStageEmail = "<p>" + getMaitredestageemail() + "</p>";
		
		String lAdresseDebut = "<div class='adresseBlock'>";
		String lAdresseFin = "</div>";
		String lAdresseTitre = "<div class='titre'>Adresse</div>";
		String lAdresse = lAdresseDebut + lAdresseTitre + getAdresse().getHtml().getHtml() + lAdresseFin;
		
		String lEntreprise = lNom + lMaitreDeStage + lMaitreDeStageEmail+ lAdresse;
		Html lHtml = new Html();
		lHtml.setHtml(lEntreprise);
		
		return lHtml;
	}
}
